package c.c.a;

import com.bytedance.embedapplog.IDataObserver;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Iterator;
import org.json.JSONObject;

public class j0 implements IDataObserver {
    public static ArrayList<WeakReference<IDataObserver>> a = new ArrayList(4);

    public synchronized void onIdLoaded(String str, String str2, String str3) {
        Iterator it = a.iterator();
        while (it.hasNext()) {
            IDataObserver iDataObserver = (IDataObserver) ((WeakReference) it.next()).get();
            if (iDataObserver == null) {
                it.remove();
            } else {
                iDataObserver.onIdLoaded(str, str2, str3);
            }
        }
    }

    public synchronized void onRemoteAbConfigGet(boolean z, JSONObject jSONObject) {
        Iterator it = a.iterator();
        while (it.hasNext()) {
            IDataObserver iDataObserver = (IDataObserver) ((WeakReference) it.next()).get();
            if (iDataObserver == null) {
                it.remove();
            } else {
                iDataObserver.onRemoteAbConfigGet(z, jSONObject);
            }
        }
    }

    public synchronized void onRemoteConfigGet(boolean z, JSONObject jSONObject) {
        Iterator it = a.iterator();
        while (it.hasNext()) {
            IDataObserver iDataObserver = (IDataObserver) ((WeakReference) it.next()).get();
            if (iDataObserver == null) {
                it.remove();
            } else {
                iDataObserver.onRemoteConfigGet(z, jSONObject);
            }
        }
    }

    public synchronized void onRemoteIdGet(boolean z, String str, String str2, String str3, String str4, String str5, String str6) {
        Iterator it = a.iterator();
        while (it.hasNext()) {
            IDataObserver iDataObserver = (IDataObserver) ((WeakReference) it.next()).get();
            if (iDataObserver == null) {
                it.remove();
            } else {
                iDataObserver.onRemoteIdGet(z, str, str2, str3, str4, str5, str6);
            }
        }
    }
}
